package com.dc.designPattern._17_mediator.impl;

/**
 * Description: 中介者模式_具体同事类_TV
 * @author: gdc
 * @date: 2021/6/2
 * @version 1.0
 */
public class Tv extends Colleague {

    public Tv(Mediator mediator, String name) {
        super(mediator, name);

        mediator.register(name, this);
    }

    /**
     * 打开电视
     */
    public void startTv() {
        System.out.println("开始看电视...");
    }

    /**
     * 关闭电视
     */
    public void closeTv() {
        System.out.println("关闭电视");
    }
}
